<?php

/**
 * StaticContent form.
 *
 * @package    elearning
 * @subpackage form
 * @author     Your name here
 */
class StaticContentForm extends BaseStaticContentForm
{
  public function configure()
  {
	unset($this['created_at'], $this['updated_at']);	
 
    //$this->embedI18n(array('en', 'vn'));
    //$this->widgetSchema->setLabel('en', 'English');
    //$this->widgetSchema->setLabel('vn', 'Vietnamese');
	$lang_current = sfContext::getInstance()->getUser()->getCulture();
	$this->languages = array($lang_current => $lang_current);
	//sfConfig::get('app_accepted_languages'); 
    $langs = array_keys($this->languages);
    $this->embedI18n($langs);
    foreach($this->languages as $lang => $label)
    {
      $this->widgetSchema[$lang]->setLabel($label);
    }
	
	$this->widgetSchema['is_public'] = new sfWidgetFormInputCheckbox(array("value_attribute_value" => 1),array('value' => 1));
	
  }
}
